﻿''' <summary>
''' 
''' </summary>
''' <remarks></remarks>

Public Class ReservaPuntual
    Public Bd As BD
    Private Sub ReservaPuntual_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Me.MdiParent = Principal
        Bd = Principal.Bd()


        Dim ArrayClientes As ArrayList = Bd.CargarClientes()
        Dim MiCliente As Cliente
        For Each MiCliente In ArrayClientes
            ComboBoxClientes.Items.Add(MiCliente.Dni() + " - " + MiCliente.Nombre())
        Next

        DateTimePickerReservas.MaxDate = DateTime.Now.AddDays(Principal.Configuracion.DiasAntelacion())

        Dim Contador As Integer = 1
        Dim Array As ArrayList = New ArrayList()


        For i As Integer = 1 To 3
            Dim Hora As Horas = New Horas()
            If (i = 1) Then
                Hora.Top = 70
            Else
                Hora.Top = i * 100
            End If

            Hora.Left = 20
            Hora.LabelPista.Text = "Pista " + i.ToString()
            Me.Controls.Add(Hora)
            Array.Add(Hora)

        Next



    End Sub

    Private Sub DateTimePickerReservas_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePickerReservas.ValueChanged
        Dim fechaActual As DateTime = DateTimePickerReservas.Value()

        'Dim ArrayL As ArrayList = Bd.RecuperarReservas(fechaActual)

        'If (ArrayL.Count() > 0) Then
        'Label2.Text = ArrayL(0)
        ' End If

    End Sub

    
End Class